<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd

">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="my" uri="http://www.trkj.com/tr1702/tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>招聘申请单</title>
<script type="text/javascript"src="<c:url value="/js/jquery-easyui-1.5.4.2/jquery.min.js"/>"></script>
<script type="text/javascript"src="<c:url value="/js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"src="<c:url value="/js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"/>"></script>
<link rel="stylesheet" type="text/css"href="<c:url value="/js/jquery-easyui-1.5.4.2/themes/default/easyui.css"/>" />
<link rel="stylesheet" type="text/css"href="<c:url value="/js/jquery-easyui-1.5.4.2/themes/icon.css"/>" />

<style type="text/css">
	.kontge{
		padding-right: 10px;
	}
	.l-btn-text{
   	 line-height:20px;
    }
    .de{
        padding:20px;
    
    }
   
</style>
	
</head>

<body>

	<script type="text/javascript">
		$(function() {
			/* 点击添加进入添加面板 */
			
			$(".add2").linkbutton({
				onClick : function() {
					$("#ra_dialog_insert").dialog("open");
				}
			});
			
	 		
		});
		
		/*编辑*/
		function ra_edit(reappId){
			$("#ra_form_edit").form('load','hr_ra_find_load?reappId='+reappId);
			$("#ra_dialog_edit").dialog('open');
		}
		/*删除*/
		function ra_dlt(reappId){
	 		$.messager.confirm('确认', '您确定要删除吗？', function(v){
	 			if(v){
	 				$.post("hr_ra_form_dlt", {reappId:reappId}, function(){
						$('.ra_datagrid_table').datagrid('reload');
					});
	 			}
				
			});
	 	}
		/*操作图标*/
		var ra_Formatter = function(value,row,index){
			var block = "<a class='easyui-linkbutton cell_btn_block' onclick='wrong(" + row.reappId + ")'>停用</a>";
			var edit="";
			<my:g id="109"> edit = "<a style='margin:0px 1px;' class='easyui-linkbutton cell_btn_edit' onclick='ra_edit(" + row.reappId + ")'>编辑</a>";</my:g>
			var del ="";
			
			<my:g id="110">    del = "<a class='easyui-linkbutton cell_btn_del' onclick='ra_dlt(" + row.reappId + ")'>删除</a>";</my:g>
			return block+edit+del; 
		}
		/* 操作图标*/
 		$(".ra_datagrid_table").datagrid({onLoadSuccess: function(){
			$(".cell_btn_edit").linkbutton({height:18,plain:true});
			$(".cell_btn_del").linkbutton({height:18,plain:true});
			$(".cell_btn_block").linkbutton({height:18,plain:true});
		}});
		
		
 		$('.search_a').linkbutton({
			onClick : function() {
				$('.ra_datagrid_table').datagrid({ url:'lzs_Recruitapplychaxun?text='+$('#search_input_a').val() });//重新指定url
                alert(text)
				$('.ra_datagrid_table').datagrid('load',{  
                });
			}
		});
	</script>
	<div class="easyui-panel trainhomepage2"  data-options="fit:true,border:false">
		<!-- 按钮 -->
		<div id="bt_ra">
			<my:g id="107"><a id="insert" class="easyui-linkbutton add2" data-options="iconCls:'icon-add',text:'新增',width:80"></a></my:g>
			<span class="kontge"></span>
			<a class="easyui-linkbutton"  data-options="iconCls:'icon-print'"></a>
			<a class="easyui-linkbutton" data-options="iconCls:'icon-reload'"></a>
			<a class="easyui-linkbutton" data-options="iconCls:'icon-print'"></a>
			<a class="easyui-linkbutton" data-options="iconCls:'icon-reload'"></a>
<!-- 			<span class="kontge"></span>
				<input class="easyui-datebox" data-options="label:'日期从', width:250,labelWidth:50" />
			<span class="kontge"></span>
				<input class="easyui-datebox" data-options="label:'到', width:250,labelWidth:30" />
			<span class="kontge"></span>
				
		 <input id="search_input_a" class="easyui-textbox " data-options="   	width:120,labelWidth:30"> 
	     <a class="easyui-linkbutton search_a" data-options="iconCls:'icon-search',text:'搜索'"></a>
		</div> -->
		<!-- 数据表 -->
		<table class="easyui-datagrid ra_datagrid_table" data-options="
			fit:true,
			singleSelect:true,
			nowrap:true,
			toolbar:'#bt1',	
			rownumbers:true,
			url:'hr_ra_find',
			<!-- 分页 -->
			pagination:true,
			<!-- ulr: -->
			pageSize:5,
			pageList:[5,10,15]
		">
			<thead>
				<tr>
<!-- 版本编号	
版本名称	
开始日期	
结束日期	
备注	
状态	
关闭 -->
					<th data-options="field:'reappId',width:100">申请编号</th>
					<th data-options="field:'organization',width:100">组织</th>
					<th data-options="field:'position',width:100">职位</th>
					
					<th data-options="field:'reappExplain',width:100">说明</th>
					<th data-options="field:'reappPlan',width:150">计划招聘人数</th>
					<th data-options="field:'reappDemanddate',width:150">申请日期</th>
					<th data-options="field:'operation',width:200,formatter:ra_Formatter"></th>
				</tr>
			</thead>
			<tbody>

				
			</tbody>
		</table>
	<!-- （添加）-->
	<div id="ra_dialog_insert" class="easyui-dialog"  	style="padding:30px 0px 50px 80px " data-options="
		width:400,
		height:260,
		title:'新增招聘申请单',
		bodyCls:'awby',
		closed:true,
		buttons:[{
				text:'添加',
				iconCls:'icon-ok',
				handler:function(){
					$('#ra_form_add').form({
						url:'hr_ra_form_add_c',
							onSubmit:function(){
								//验证表单
								return $('#ra_form_add').form('validate');
								
							},
							success:function(v){
								$.messager.alert('提示','恭喜，添加成功！');
								$('#ra_dialog_insert').dialog('close');
								$('#ra_form_add').form('reset');
								$('.ra_datagrid_table').datagrid('reload');
							}
						}).submit();
				}
			},{
				text:'关闭',
				iconCls:'icon-cancel',
				handler:function(){
					$('#ra_dialog_insert').dialog('close');
				}
			}]">
			<form id="ra_form_add">
				<table>
					<!-- 
					*组织区域  2
					*版本名称  1s
					*开始日期  2s
					*结束日期  2s
					备注 b
					-->
					<tr><td><input class="easyui-textbox" name="reappId" data-options="label:'申请单编号', width:200,labelWidth:100" /></td></tr>
					<tr><td><input class="easyui-textbox" name="reappExplain" data-options="label:'申请说明', width:200,labelWidth:100"/></td></tr>
					<tr><td><input class="easyui-textbox" name="reappPlan" data-options="label:'计划招聘人数 ', width:200,multiline:true,labelWidth:100"/></td></tr>
				<!-- 	<tr><td>停用<input type="checkbox"/></td></tr> -->
				</table>
			</form>
		</div>
		
		
		
		
		
		
		
		
		
		
		
		<!-- （编辑）-->
	<div id="ra_dialog_edit" class="easyui-dialog de" 	style="padding:20px 0px 20px 90px "  data-options="
		width:400,
		height:260,
		title:'编辑招聘申请单',
		bodyCls:'ra_dialog_edit_awby',
		closed:true,
		buttons:[{
				text:'编辑',
				iconCls:'icon-ok',
				handler:function(){
					$('#ra_form_edit').form({
						url:'hr_ra_form_edit_c',
							onSubmit:function(){
								//验证表单
								return $('#ra_form_edit').form('validate');
								
							},
							success:function(v){
								$.messager.alert('提示','恭喜，编辑成功！');
								$('#ra_dialog_edit').dialog('close');
								$('#ra_form_edit').form('reset');
								$('.ra_datagrid_table').datagrid('reload');
							}
						}).submit();
				}
			},{
				text:'关闭',
				iconCls:'icon-cancel',
				handler:function(){
					$('#ra_dialog_insert').dialog('close');
				}
			}]">
			<form id="ra_form_edit">
				<table >
					<!-- 
					*组织区域  2
					*版本名称  1s
					*开始日期  2s
					*结束日期  2s
					备注 b
					-->
					<tr  ><td><input class="easyui-textbox " name="reappId" data-options="label:'申请单编号', width:200,labelWidth:100,align:'center'" /></td></tr>
					<tr><td><input class="easyui-textbox" name="reappExplain" data-options="label:'申请说明', width:200,labelWidth:100"/></td></tr>
					<tr><td><input class="easyui-textbox" name="reappPlan" data-options="label:'计划招聘人数 ', width:200,multiline:true,labelWidth:100"/></td></tr>
				
				</table>
			</form>
		</div>
	</div>
</body>
</html>
